package com.example.model;

import ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy;
import lombok.Data;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import java.io.Serializable;
import java.util.Date;

@Data
public class Device implements Serializable {
    private static final long serialVersionUID = 1L;

    @QuerySqlField(index = true)
    private Long id;

    @QuerySqlField(index = true)
    private String serialNumber;

    @QuerySqlField(index = true)
    private Long deviceTypeId;

    @QuerySqlField
    private String name;

    @QuerySqlField
    private Boolean active;

    @QuerySqlField(index = true)
    private Date createTime;

    public Device(){}

    public Device(Long id, String serialNumber, Long deviceTypeId, String name,boolean active,Date createTime){
        this.id=id;
        this.serialNumber=serialNumber;
        this.deviceTypeId = deviceTypeId;
        this.name = name;
        this.active = active;
        this.createTime = createTime;
    }
}

